<!-- 登录日志 -->
<template>
  <div>
    <el-table
      ref="multipleTable"
      :data="loginLogList.data?.records || null"
      tooltip-effect="dark"
      style="width: 100%"
      @selection-change="handleSelectionChange"
      @select="select"
    >
      <el-table-column type="selection"> </el-table-column>
      <el-table-column prop="id" label="用户名称"> </el-table-column>
      <el-table-column prop="ldescription" label="操作"> </el-table-column>
      <el-table-column prop="lparameter" label="IP地址" show-overflow-tooltip>
      </el-table-column>
      <el-table-column prop="lurl" label="状态" show-overflow-tooltip>
      </el-table-column>
      <el-table-column prop="createdTime" label="创建时间" show-overflow-tooltip>
      </el-table-column>
    </el-table>
    <MyPagenation
        :currentChange="handleCurrentChange"
        :sizeChange="handleSizeChange"
        :currentPageSync="pageInfo.pageNo"
        :pageSize="pageInfo.pageSize"
        :total="loginLogList.data?.total || 0"
      ></MyPagenation>
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex';
export default {
  name: "LoginLog",
  data() {
    return {
      list: [
        {
          denName: "asd",
          momentWater: "123",
          rName: "asd",
          rTel: "12345678991",
          rSex: "男",
          accountstate: "0",
          country: "China",
          flag: "",
        },
      ],
      pageInfo:{
        pageNo:1,
        pageSize:10
      }
    };
  },
  methods:{
    ...mapActions('log',['actionGetLoginLog']),
    // 页面页码变化
    handleCurrentChange(val) {
      console.log(val);
      this.pageInfo.pageNo = val;
      this.actionGetLoginLog(this.pageInfo);
    },
    // 页面大小变化
    handleSizeChange(val) {
      this.pageInfo.pageSize = val;
      this.actionGetLoginLog(this.pageInfo);
    },
  },
  mounted(){
    this.actionGetLoginLog(this.pageInfo)
  },
  computed:{
    ...mapState('log',['loginLogList'])
  }
};
</script>

<style>
</style>